﻿<html>  
<head>  
<script type="text/javascript">  
    function Stu(name,age){  
        this.name=name;  
        this.age=age;  
        this.show=function(){  
            window.alert(this.name+" "+this.age);  
        }  
    }  
    function MidStu(name,age){  
        Stu.call(this,name,age);  
    }  
    var midstu=new MidStu("王先生",28);  
    midstu.show();  
</script>  
</html>  